package com.xframe.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xframe.domain.role.IUserCredentials;
import com.xframe.xdal.core.annotation.XColumn;
import com.xframe.xdal.core.domain.SysBaseEntity;
import com.xframe.xdal.core.util.StringUtil;
import lombok.Data;


@Data
public class WareHouseBaseData extends BaseModel {

    public static final String ATT_NAME = "wareHouseId";
    /**
     * 仓库ID
     */
    @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    @XColumn(name = "ware_house_id",desc = "仓库ID",uniqueFlag = true)
    private Long wareHouseId;


    @Override
    public void setBaseAttrVal(IUserCredentials userCredentials){
        this.wareHouseId = userCredentials.getOrgId();
        super.setBaseAttrVal(userCredentials);
    }

    @Override
    public void setBaseAttrValByUpdate(IUserCredentials userCredentials){
        super.setBaseAttrValByUpdate(userCredentials);
    }
}
